﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RRRSRoguelike.Managers;
using RRRSRoguelikeData;
using System.Diagnostics;
using RRRSRoguelike.Helpers;
using System.Drawing;

namespace RRRSRoguelike.Screens
{
    /// <summary>
    /// Manages the UI to enter Random Seed Number to start.
    /// </summary>
    class MenuScreen:Screen
    {
        

        public MenuScreen()
        {
            Panels.Add(new Panel(new Point(4, 3), 
                DungeonVisualizer.GetScreenWidth() - 9, DungeonVisualizer.GetScreenHeight() - 6));                      
        }

        #region Mthods
        public override void Show()
        {
            Clear();

            //Adding MainPanel Draw similar to Story Screen to keep flow
            Panels[0].Write(   "1. Delve into the dungeon \r\n"+
                                "2. Plant a seed \r\n" +
                                "3. Exit", 
                                ConsoleColor.White,TextAlignment.Multi);
            Panels[0].Draw();
           
            //suggest using the input manager here there's an example in the keytestscreen.

            switch (GameManager.Instance.InputManager.ReadKey())
            { 
                case ConsoleKey.D1:
                case ConsoleKey.NumPad1:
                case ConsoleKey.Oem1:
                //startgame   
                //Just drop through
                break;
                
                case ConsoleKey.D2:
                case ConsoleKey.NumPad2:
                case ConsoleKey.Oem2:
                //seedScreen
                new SeedScreen().Show();
                break;

                case ConsoleKey.D3:
                case ConsoleKey.NumPad3:
                case ConsoleKey.Oem3:
                //exit
                GameManager.Instance.Exit();
                break;
            }
            
        }
        #endregion
    }
}
